package net.aiion.weave.impl.bytecode;

import java.io.OutputStream;
import java.util.Collection;

import net.aiion.weave.impl.bytecode.scanning.BytecodeStoreSinkImpl;
import net.aiion.weave.spi.bytecode.BytecodeSink;
import net.aiion.weave.spi.bytecode.BytecodeSinkFactory;
import net.aiion.weave.spi.bytecode.events.BytecodeEvent;

public class BytecodeSinkFactoryImpl implements BytecodeSinkFactory
{
    public BytecodeSinkFactoryImpl() {
    }

    @Override
    public BytecodeSink createWriter(final OutputStream aOutputStream) {
        return new BytecodeOutputStreamWriterSinkImpl(aOutputStream);
    }

    @Override
    public BytecodeSink createWriter(final Collection<BytecodeEvent> aTarget) {
        return new BytecodeCollectionWriterSinkImpl(aTarget);
    }

    @Override
    public BytecodeSink createWriter() {
        return new BytecodeStoreSinkImpl();
    }
}
